package com.wander.patterns.create.singleton;

/**
 * @description:懒汉式单例模式 天生线程安全
 * @author: zhuyong
 * @create: 2019-09-04 14:02
 **/
public class HungSingleton {
    //1.提供静态属性 类一加载的时候执行
    private static HungSingleton instance = new HungSingleton();
    //2.构造私有
    private HungSingleton(){}

    public  static HungSingleton getInstance(){
        return  instance;
    }


}
